
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>Promise · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="模块化.html" />
    
    
    <link rel="prev" href="prototype.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="./">
            
                <a href="./">
            
                    
                    Introduction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="变量.html">
            
                <a href="变量.html">
            
                    
                    变量
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="解构.html">
            
                <a href="解构.html">
            
                    
                    解构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="字符串.html">
            
                <a href="字符串.html">
            
                    
                    字符串
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="函数.html">
            
                <a href="函数.html">
            
                    
                    函数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="数组.html">
            
                <a href="数组.html">
            
                    
                    数组
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="对象.html">
            
                <a href="对象.html">
            
                    
                    对象
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="prototype.html">
            
                <a href="prototype.html">
            
                    
                    prototype
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.9" data-path="Promise.html">
            
                <a href="Promise.html">
            
                    
                    Promise
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="模块化.html">
            
                <a href="模块化.html">
            
                    
                    模块化
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11" data-path="class和继承.html">
            
                <a href="class和继承.html">
            
                    
                    class和继承
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12" data-path="this.html">
            
                <a href="this.html">
            
                    
                    this
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13" data-path="Symbol和generator.html">
            
                <a href="Symbol和generator.html">
            
                    
                    Symbol和generator
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.14" data-path="async_await.html">
            
                <a href="async_await.html">
            
                    
                    async_await
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15" data-path="Set和WeakSet.html">
            
                <a href="Set和WeakSet.html">
            
                    
                    Set和WeakSet
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.16" data-path="Map和WeakMap.html">
            
                <a href="Map和WeakMap.html">
            
                    
                    Map和WeakMap
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.17" data-path="数字和Math.html">
            
                <a href="数字和Math.html">
            
                    
                    数字和Math
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.18" data-path="正则.html">
            
                <a href="正则.html">
            
                    
                    正则
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.19" data-path="Proxy.html">
            
                <a href="Proxy.html">
            
                    
                    Proxy
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="." >Promise</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="promise">Promise</h1>
<p>Promise:
&#x4F5C;&#x7528;: &#x89E3;&#x51B3;&#x5F02;&#x6B65;&#x56DE;&#x8C03;&#x95EE;&#x9898;
&#x4F20;&#x7EDF;&#x65B9;&#x5F0F;:</p>
<pre><code class="lang-js">ajax(url, { <span class="hljs-comment">// &#x63A5;&#x53E3;1</span>
    ajax(url,()=&gt;{ <span class="hljs-comment">// &#x63A5;&#x53E3;2</span>
        ajax(url, () =&gt; { <span class="hljs-comment">// &#x63A5;&#x53E3;3</span>
            ...
        })
    })
})
</code></pre>
<p>Promise&#x8BED;&#x6CD5;&#x793A;&#x4F8B;:</p>
<pre><code class="lang-js">&lt;script type=<span class="hljs-string">&quot;text/javascript&quot;</span>&gt;
    <span class="hljs-keyword">let</span> a = <span class="hljs-number">20</span>;
    <span class="hljs-keyword">let</span> promise = <span class="hljs-keyword">new</span> <span class="hljs-built_in">Promise</span>(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">resolve, reject</span>) </span>{
        <span class="hljs-comment">// resolve: &#x6210;&#x529F;&#x8C03;&#x7528;</span>
        <span class="hljs-comment">// reject: &#x5931;&#x8D25;&#x8C03;&#x7528;</span>
        <span class="hljs-keyword">if</span> (a == <span class="hljs-number">10</span>) {
            resolve(<span class="hljs-string">&apos;&#x6210;&#x529F;&apos;</span>);
        } <span class="hljs-keyword">else</span> {
            reject(<span class="hljs-string">&apos;&#x5931;&#x8D25;&apos;</span>);
        }
    });
    <span class="hljs-comment">// promise.then(success, fail);</span>
    promise.then(res =&gt; {
        <span class="hljs-built_in">console</span>.log(res); <span class="hljs-comment">// &#x6210;&#x529F;</span>
    }, err =&gt; {
        <span class="hljs-built_in">console</span>.log(err); <span class="hljs-comment">// &#x5931;&#x8D25;</span>
    });

    promise.catch(err =&gt; { <span class="hljs-comment">//reject</span>
        <span class="hljs-built_in">console</span>.log(err); <span class="hljs-comment">// &#x5931;&#x8D25;</span>
    });
<span class="xml"><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span></span>
</code></pre>
<p>promise.then&#x7684;&#x8FD4;&#x56DE;&#x503C;&#x4E5F;&#x662F;&#x4E00;&#x4E2A;Promise, &#x56E0;&#x6B64;&#x5B83;&#x53EF;&#x4EE5;&#x7EE7;&#x7EED;&#x94FE;&#x5F0F;&#x8C03;&#x7528;</p>
<pre><code class="lang-js">&lt;script type=<span class="hljs-string">&quot;text/javascript&quot;</span>&gt;
    <span class="hljs-keyword">let</span> a = <span class="hljs-number">20</span>;
    <span class="hljs-keyword">let</span> promise = <span class="hljs-keyword">new</span> <span class="hljs-built_in">Promise</span>(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">resolve, reject</span>) </span>{
        <span class="hljs-keyword">if</span> (a == <span class="hljs-number">10</span>) {
            resolve(<span class="hljs-string">&apos;&#x6210;&#x529F;&apos;</span>);
        } <span class="hljs-keyword">else</span> {
            reject(<span class="hljs-string">&apos;&#x5931;&#x8D25;&apos;</span>);
        }
    });

    promise.then(res =&gt; {
        <span class="hljs-built_in">console</span>.log(res); <span class="hljs-comment">// &#x6210;&#x529F;</span>
    }).catch(err =&gt; { <span class="hljs-comment">//reject</span>
        <span class="hljs-built_in">console</span>.log(err); <span class="hljs-comment">// &#x5931;&#x8D25;</span>
    });
<span class="xml"><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span></span>
</code></pre>
<ul>
<li>Promise.resolve(&apos;aa&apos;): &#x628A;&apos;aa&apos;&#x8F6C;&#x6210;&#x4E00;&#x4E2A;Promise&#x5BF9;&#x8C61;, &#x4E14;&#x662F; resolve &#x72B6;&#x6001;(&#x6210;&#x529F;&#x72B6;&#x6001;)</li>
<li>Promise.reject(&apos;bb&apos;): &#x628A;&apos;bb&apos;&#x8F6C;&#x6210;&#x4E00;&#x4E2A;Promise&#x5BF9;&#x8C61;, &#x4E14;&#x662F; reject &#x72B6;&#x6001;(&#x9519;&#x8BEF;&#x72B6;&#x6001;)</li>
</ul>
<pre><code class="lang-js">&lt;script type=<span class="hljs-string">&quot;text/javascript&quot;</span>&gt;
    <span class="hljs-comment">//let p1 = Promise.resolve(&apos;aaa&apos;);</span>
    <span class="hljs-comment">//&#x4E0A;&#x53E5;&#x4EE3;&#x7801;&#x7B49;&#x4EF7;&#x4E8E;:</span>
    <span class="hljs-keyword">let</span> p1 = <span class="hljs-keyword">new</span> <span class="hljs-built_in">Promise</span>(resolve =&gt; {
        resolve(<span class="hljs-string">&apos;aaa&apos;</span>)
    });
<span class="xml"><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span></span>
</code></pre>
<h3 id="promiseall">Promise.all</h3>
<p><code>Promise.all([p1, p2, p3]</code>): &#x628A;<code>promise</code>&#x6253;&#x5305;, &#x6254;&#x5230;&#x4E00;&#x4E2A;&#x6570;&#x7EC4;&#x91CC;&#x9762;, &#x6253;&#x5305;&#x5B8C;&#x8FD8;&#x662F;&#x4E00;&#x4E2A;promise&#x5BF9;&#x8C61;<br>&#x6CE8;: &#x4F7F;&#x7528;Promise.all&#x65F6;, &#x53EA;&#x6709;&#x5F53;&#x6240;&#x6709;&#x7684;promise&#x5BF9;&#x8C61;&#x90FD;&#x662F;resolve&#x72B6;&#x6001;, &#x624D;&#x4F1A;&#x8D70;&#x6210;&#x529F;&#x56DE;&#x8C03;</p>
<pre><code class="lang-js">&lt;script type=<span class="hljs-string">&quot;text/javascript&quot;</span>&gt;
    <span class="hljs-comment">// &#x5047;&#x8BBE;p1, p2, p3&#x662F;&#x4E09;&#x4E2A;&#x8BF7;&#x6C42;</span>
    <span class="hljs-comment">// &#x9700;&#x6C42;: &#x5F53;&#x8FD9;&#x4E09;&#x4E2A;&#x8BF7;&#x6C42;&#x5168;&#x6210;&#x529F;&#x540E;&#x56DE;&#x8C03;, &#x53EF;&#x4EE5;&#x4F7F;&#x7528; Promise.all</span>
    <span class="hljs-keyword">let</span> p1 = <span class="hljs-built_in">Promise</span>.resolve(<span class="hljs-string">&apos;aaa&apos;</span>); 
    <span class="hljs-keyword">let</span> p2 = <span class="hljs-built_in">Promise</span>.resolve(<span class="hljs-string">&apos;bbb&apos;</span>);
    <span class="hljs-keyword">let</span> p3 = <span class="hljs-built_in">Promise</span>.resolve(<span class="hljs-string">&apos;ccc&apos;</span>);
    <span class="hljs-built_in">Promise</span>.all([p1, p2, p3]).then(res =&gt; {
          <span class="hljs-comment">// &#x53EA;&#x6709;&#x5F53; p1, p2, p3 &#x5168;&#x90E8;&#x4E3A; resolve &#x72B6;&#x6001;&#x65F6;&#x624D;&#x4F1A;&#x8D70;&#x5230;&#x8FD9;&#x91CC;</span>
        <span class="hljs-comment">// &#x5426;&#x5219;&#x4F1A;&#x8D70;&#x5230; catch</span>
        <span class="hljs-comment">// OK: console.log(res); // [&apos;aaa&apos;, &apos;bbb&apos;, &apos;ccc&apos;]</span>
        <span class="hljs-keyword">let</span> [res1, res2, res3] = res;
        <span class="hljs-built_in">console</span>.log(res1, res2, res3); <span class="hljs-comment">// aaa bbb ccc</span>
    }).catch(err =&gt; {
          <span class="hljs-built_in">console</span>.log(err);
     });
<span class="xml"><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span></span>
</code></pre>
<h3 id="promiserace">Promise.race</h3>
<pre><code class="lang-js">&lt;script type=<span class="hljs-string">&quot;text/javascript&quot;</span>&gt;
     <span class="hljs-comment">// &#x4E09;&#x4E2A;&#x8BF7;&#x6C42;, &#x53EA;&#x8981;&#x6709;&#x4E00;&#x4E2A;&#x6210;&#x529F;&#x5C31;&#x56DE;&#x8C03;</span>
    <span class="hljs-comment">// &#x53EF;&#x4EE5;&#x4F7F;&#x7528; Promise.race</span>
    <span class="hljs-keyword">let</span> p1 = <span class="hljs-built_in">Promise</span>.reject(<span class="hljs-string">&apos;aaa&apos;</span>);
    <span class="hljs-keyword">let</span> p2 = <span class="hljs-built_in">Promise</span>.resolve(<span class="hljs-string">&apos;bbb&apos;</span>);
    <span class="hljs-keyword">let</span> p3 = <span class="hljs-built_in">Promise</span>.resolve(<span class="hljs-string">&apos;ccc&apos;</span>);
    <span class="hljs-built_in">Promise</span>.race([p1, p2, p3]).then(res =&gt; {
        <span class="hljs-comment">// &#x53EA;&#x8981;&#x6709;&#x4E00;&#x4E2A;&#x662F; resolve &#x72B6;&#x6001;&#x5C31;&#x4F1A;&#x8D70;&#x5230;&#x8FD9;&#x91CC;</span>
        <span class="hljs-comment">// &#x4F46;&#x662F;&#x8FD9;&#x91CC;&#x7684; res &#x5C31;&#x662F;&#x7B2C;&#x4E00;&#x4E2A;&#x662F; resolve &#x72B6;&#x6001;&#x7684;Promise</span>
        <span class="hljs-built_in">console</span>.log(res); <span class="hljs-comment">// aaa</span>
    }).catch(err =&gt; {
        <span class="hljs-comment">// &#x5168;&#x90E8;&#x5931;&#x8D25;&#x5C31;&#x4F1A;&#x8D70;&#x5230;&#x8FD9;&#x91CC;, err &#x662F;&#x7B2C;&#x4E00;&#x4E2A;&#x5931;&#x8D25;&#x7684;Promise</span>
        <span class="hljs-built_in">console</span>.log(err);
    });
<span class="xml"><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span></span>
</code></pre>
<h3 id="&#x9879;&#x76EE;&#x793A;&#x4F8B;">&#x9879;&#x76EE;&#x793A;&#x4F8B;</h3>
<pre><code class="lang-js">&lt;!DOCTYPE html&gt;
<span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">html</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">head</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">title</span>&gt;</span>var<span class="hljs-tag">&lt;/<span class="hljs-name">title</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">mete</span> <span class="hljs-attr">name</span>=<span class="hljs-string">&quot;viewport&quot;</span> <span class="hljs-attr">content</span>=<span class="hljs-string">&quot;width=device-width, initial-scale=1&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">meter</span>&gt;</span>

    <span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">&quot;text/javascript&quot;</span>&gt;</span><span class="javascript">
        <span class="hljs-keyword">let</span> status = <span class="hljs-number">1</span>;
        <span class="hljs-comment">// &#x6A21;&#x62DF;&#x767B;&#x5F55;</span>
        <span class="hljs-keyword">let</span> userLogin = (resolve, reject) =&gt; {
            setTimeout(() =&gt; {
                <span class="hljs-keyword">if</span> (status == <span class="hljs-number">1</span>) {
                    resolve({code:<span class="hljs-number">1</span>, data:<span class="hljs-string">&apos;success&apos;</span>, msg:<span class="hljs-string">&apos;login success&apos;</span>});
                } <span class="hljs-keyword">else</span> {
                    reject({code:<span class="hljs-number">0</span>, msg:<span class="hljs-string">&apos;login fail&apos;</span>});
                }
            }, <span class="hljs-number">2000</span>);
        };

        <span class="hljs-comment">// &#x6A21;&#x62DF;&#x767B;&#x5F55;&#x540E;&#x83B7;&#x53D6;&#x7528;&#x6237;&#x4FE1;&#x606F;</span>
        <span class="hljs-keyword">let</span> getUserInfo = (resolve, reject) =&gt; {
            setTimeout(() =&gt; {
                <span class="hljs-keyword">if</span> (status == <span class="hljs-number">1</span>) {
                    resolve({code:<span class="hljs-number">1</span>, data:<span class="hljs-string">&apos;{name: daliu, age: 18}&apos;</span>, msg:<span class="hljs-string">&apos;get user info success&apos;</span>, token: <span class="hljs-string">&apos;X12Jkj34r7l5&apos;</span>});
                } <span class="hljs-keyword">else</span> {
                    reject({code:<span class="hljs-number">0</span>, msg:<span class="hljs-string">&apos;get user info fail&apos;</span>});
                }
            }, <span class="hljs-number">1000</span>);
        }

        <span class="hljs-keyword">let</span> loginAndGetUserInfo = () =&gt; {
            <span class="hljs-keyword">new</span> <span class="hljs-built_in">Promise</span>(userLogin).then(res =&gt; {
                <span class="hljs-built_in">console</span>.log(<span class="hljs-string">&apos;&#x767B;&#x5F55;&#x6210;&#x529F;: &apos;</span>, res);
                <span class="hljs-built_in">console</span>.log(<span class="hljs-string">&apos;&#x4F7F;&#x7528;&#x767B;&#x5F55;&#x6210;&#x529F;&#x7684;token&#x83B7;&#x53D6;&#x7528;&#x6237;&#x4FE1;&#x606F;&apos;</span>);
                <span class="hljs-keyword">return</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">Promise</span>(getUserInfo);
            }).then(res =&gt; {
                <span class="hljs-built_in">console</span>.log(<span class="hljs-string">&apos;&#x83B7;&#x53D6;&#x7528;&#x6237;&#x4FE1;&#x606F;&#x6210;&#x529F;: &apos;</span>, res);
            })    
        }
    </span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>

<span class="hljs-tag">&lt;/<span class="hljs-name">head</span>&gt;</span>

<span class="hljs-tag">&lt;<span class="hljs-name">body</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">button</span> <span class="hljs-attr">type</span>=<span class="hljs-string">&quot;button&quot;</span> <span class="hljs-attr">onclick</span>=<span class="hljs-string">&quot;loginAndGetUserInfo()&quot;</span>&gt;</span>&#x6A21;&#x62DF;&#x767B;&#x5F55;&#x5E76;&#x83B7;&#x53D6;&#x7528;&#x6237;&#x4FE1;&#x606F;<span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">body</span>&gt;</span>

<span class="hljs-tag">&lt;/<span class="hljs-name">html</span>&gt;</span></span>
</code></pre>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="prototype.html" class="navigation navigation-prev " aria-label="Previous page: prototype">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="模块化.html" class="navigation navigation-next " aria-label="Next page: 模块化">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"Promise","level":"1.9","depth":1,"next":{"title":"模块化","level":"1.10","depth":1,"path":"模块化.md","ref":"模块化.md","articles":[]},"previous":{"title":"prototype","level":"1.8","depth":1,"path":"prototype.md","ref":"prototype.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["livereload"],"pluginsConfig":{"livereload":{},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"Promise.md","mtime":"2021-12-11T12:41:54.166Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2022-02-17T15:54:39.156Z"},"basePath":".","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="gitbook/gitbook.js"></script>
    <script src="gitbook/theme.js"></script>
    
        
        <script src="gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

